//
//  AuthorizeController.m
//  DA_V
//
//  Created by 周季阳 on 15/5/5.
//  Copyright (c) 2015年 zhouhai. All rights reserved.
//

#import "AuthorizeController.h"
#import "InterFace.h"
#import "UIViewAdditions.h"

@interface AuthorizeController ()<UITextFieldDelegate>
{
    UITextField *zTextField;
    UIButton *zWeChatBtn;
}
@end

@implementation AuthorizeController

#pragma mark - viewDidLoad
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationController.navigationBarHidden = YES;
    
    [self initUI];
}
#pragma mark - initUI
-(void)initUI{
    zTextField = [[UITextField alloc] initWithFrame:CGRectMake((SCREEN_WIDTH-SCREEN_WIDTH*0.875)/2, 200, SCREEN_WIDTH*0.875, SCREEN_WIDTH*0.25)];
    zTextField.placeholder = @"手机号";
    zTextField.font = [UIFont systemFontOfSize:14];
    [self.view addSubview:zTextField];
    zTextField.delegate = self;
    
    zWeChatBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    zWeChatBtn.frame = CGRectMake((SCREEN_WIDTH-SCREEN_WIDTH*0.875)/2, zTextField.bottom+20, SCREEN_WIDTH*0.875, SCREEN_WIDTH*0.125);
    //[zWeChatBtn setBackgroundImage:[UIImage imageNamed:@"login"] forState:UIControlStateNormal];
    //[zWeChatBtn setBackgroundImage:[UIImage imageNamed:@"login1"] forState:UIControlStateHighlighted];
    [zWeChatBtn setTitle:@"登录" forState:UIControlStateNormal];
    zWeChatBtn.backgroundColor = [self colorWithHexString:@"#189BCA"];
    [zWeChatBtn.layer setCornerRadius:8.0]; //设置矩形四个圆角半径
    [zWeChatBtn.layer setBorderWidth:1.0]; //边框宽度
    [zWeChatBtn addTarget:self action:@selector(clickAuthorizeBtn) forControlEvents:UIControlEventTouchUpInside];
    zWeChatBtn.titleLabel.textColor = [UIColor whiteColor];
    zWeChatBtn.titleLabel.font = [UIFont systemFontOfSize:13];
    [self.view addSubview:zWeChatBtn];

}
#pragma mark - 微信授权
-(void)clickAuthorizeBtn{
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
